From: Georges Basile Stavracas Neto Date: Fri, 3 Apr 2020 21:09:09 +0000 (-0300) Subject: appDisplay: Set the folder icon geometry through CSS X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~524 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b27c89f836164da35fe866bb538e05ea7006c114;p=gnome-shell.git appDisplay: Set the folder icon geometry through CSS The CSS engine is scale-aware, whereas simply setting the width and height properties directly isn't. Use CSS to set the folder icon. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index e13d5f7b9..ed616e855 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1376,12 +1376,12 @@ class FolderView extends BaseAppView { }); layout.hookup_style(icon); let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size); - let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor; let numItems = this._orderedItems.length; let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL; for (let i = 0; i < 4; i++) { - let bin = new St.Bin({ width: subSize * scale, height: subSize * scale }); + const style = 'width: %dpx; height: %dpx;'.format(subSize, subSize); + let bin = new St.Bin({ style }); if (i < numItems) bin.child = this._orderedItems[i].app.create_icon_texture(subSize); layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);